package com.lvtulife.common.bean;

import java.io.Serializable;
import java.util.Date;

public class BaseVo implements Serializable {
    private Long id;
    private Long userId;
    private Date createDt;
    private Date updateDt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Date getCreateDt() {
        return defaultDate(createDt);
    }

    public void setCreateDt(Date createDt) {
        this.createDt = createDt;
    }

    public Date getUpdateDt() {
        return defaultDate(updateDt);
    }

    public void setUpdateDt(Date updateDt) {
        this.updateDt = updateDt;
    }

    private Date defaultDate(Date temp) {
        return temp == null ? new Date() : temp;
    }
}

